/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * BackupSetEditor.java
 *
 * Created on Nov 25, 2009, 3:14:45 PM
 */
package com.cloudminga.gui;

/**
 *
 * @author Lakhan
 */
import com.globussoft.filesystem.*;
public class BackupSetEditor extends javax.swing.JDialog {

    /** Creates new form BackupSetEditor */
    public BackupSetEditor(java.awt.Frame parent, boolean modal) {
        super(parent, modal);

        initComponents();
        FileTree filetree = new FileTree();
        // FileTreePanel f1=new FileTreePanel();
        fileList.add(filetree);/*adds filetree to the fileList*/
        fileList.setSize(200, 1000);/*sets size*/
        fileList.revalidate();
        fileList.repaint();
        includeexcludefileCmb.setVisible(false);
        filetypeCmb.setVisible(false);
        plusButton.setVisible(false);
        minusButton.setVisible(false);
        filetypeTxt.setVisible(false);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        backupsetnamePanel = new javax.swing.JPanel();
        backupameLabel = new javax.swing.JLabel();
        backupnameTxt = new javax.swing.JTextField();
        fileviewPanel = new javax.swing.JPanel();
        filelistSplitPane = new javax.swing.JSplitPane();
        filelistScrollPane = new javax.swing.JScrollPane();
        fileList = new javax.swing.JList();
        FiledisplayScrollPane = new javax.swing.JScrollPane();
        filedisplayTable = new javax.swing.JTable();
        addrulePanel = new javax.swing.JPanel();
        addruleButton = new javax.swing.JButton();
        includeexcludefileCmb = new javax.swing.JComboBox();
        filetypeCmb = new javax.swing.JComboBox();
        plusButton = new javax.swing.JButton();
        minusButton = new javax.swing.JButton();
        mainPanel = new javax.swing.JPanel();
        filetypePanel = new javax.swing.JPanel();
        filetypeTxt = new javax.swing.JTextField();
        SizePanel = new javax.swing.JPanel();
        filesizeCmb = new javax.swing.JComboBox();
        filesizeTxt = new javax.swing.JTextField();
        filesizeLabel = new javax.swing.JLabel();
        filecreatePanel = new javax.swing.JPanel();
        createdtimeCmb = new javax.swing.JComboBox();
        createddateCmb = new javax.swing.JComboBox();
        filenamePanel = new javax.swing.JPanel();
        filenameCmb = new javax.swing.JComboBox();
        fienameLabel = new javax.swing.JTextField();
        folderPanell = new javax.swing.JPanel();
        foldertypeCmb = new javax.swing.JComboBox();
        foldernameTxt = new javax.swing.JTextField();
        folderCmb = new javax.swing.JComboBox();
        lastmodifiedPanel = new javax.swing.JPanel();
        lastmodifiedCmb = new javax.swing.JComboBox();
        lastmodifieddateCMB = new javax.swing.JComboBox();
        saveButton = new javax.swing.JButton();
        cancelButton = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Backup Set Editor"); // NOI18N

        backupameLabel.setText("Backup Set Name  :"); // NOI18N

        backupnameTxt.setText("      Untitled Backup set1"); // NOI18N
        backupnameTxt.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                backupnameTxtActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout backupsetnamePanelLayout = new javax.swing.GroupLayout(backupsetnamePanel);
        backupsetnamePanel.setLayout(backupsetnamePanelLayout);
        backupsetnamePanelLayout.setHorizontalGroup(
            backupsetnamePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(backupsetnamePanelLayout.createSequentialGroup()
                .addGap(32, 32, 32)
                .addComponent(backupameLabel)
                .addGap(61, 61, 61)
                .addComponent(backupnameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(446, Short.MAX_VALUE))
        );
        backupsetnamePanelLayout.setVerticalGroup(
            backupsetnamePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(backupsetnamePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(backupameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)
                .addComponent(backupnameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        filelistSplitPane.setMinimumSize(new java.awt.Dimension(800, 100));

        filelistScrollPane.setMinimumSize(new java.awt.Dimension(252, 202));
        filelistScrollPane.setPreferredSize(new java.awt.Dimension(55, 130));

        fileList.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "Item9", "Item10", "Item11", "Item12", "Item13", "Item14" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        filelistScrollPane.setViewportView(fileList);

        filelistSplitPane.setLeftComponent(filelistScrollPane);

        FiledisplayScrollPane.setMinimumSize(new java.awt.Dimension(252, 202));
        filelistSplitPane.setRightComponent(FiledisplayScrollPane);

        filedisplayTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                " Name", "InFolder", "Size", "Type", "Title 5"
            }
        ));
        filedisplayTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        filedisplayTable.setShowHorizontalLines(false);
        filedisplayTable.setShowVerticalLines(false);
        filelistSplitPane.setRightComponent(filedisplayTable);

        javax.swing.GroupLayout fileviewPanelLayout = new javax.swing.GroupLayout(fileviewPanel);
        fileviewPanel.setLayout(fileviewPanelLayout);
        fileviewPanelLayout.setHorizontalGroup(
            fileviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(fileviewPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(filelistSplitPane, javax.swing.GroupLayout.PREFERRED_SIZE, 649, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(161, Short.MAX_VALUE))
        );
        fileviewPanelLayout.setVerticalGroup(
            fileviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(fileviewPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(filelistSplitPane, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        addrulePanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Rules"));
        addrulePanel.setMinimumSize(new java.awt.Dimension(300, 200));

        addruleButton.setText("Add a Rule"); // NOI18N
        addruleButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addruleButtonActionPerformed(evt);
            }
        });

        includeexcludefileCmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Include", "Exclude" }));

        filetypeCmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "File type", "Size", "Created", "File name", "Folder name" }));
        filetypeCmb.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                filetypeCmbActionPerformed(evt);
            }
        });

        plusButton.setText("+"); // NOI18N

        minusButton.setText("-"); // NOI18N

        mainPanel.setLayout(new java.awt.CardLayout());

        javax.swing.GroupLayout filetypePanelLayout = new javax.swing.GroupLayout(filetypePanel);
        filetypePanel.setLayout(filetypePanelLayout);
        filetypePanelLayout.setHorizontalGroup(
            filetypePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(filetypeTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 402, Short.MAX_VALUE)
        );
        filetypePanelLayout.setVerticalGroup(
            filetypePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(filetypePanelLayout.createSequentialGroup()
                .addComponent(filetypeTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        mainPanel.add(filetypePanel, "card2");

        filesizeCmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "is less than", "is greater than", " ", " " }));

        filesizeLabel.setText("KB"); // NOI18N

        javax.swing.GroupLayout SizePanelLayout = new javax.swing.GroupLayout(SizePanel);
        SizePanel.setLayout(SizePanelLayout);
        SizePanelLayout.setHorizontalGroup(
            SizePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(SizePanelLayout.createSequentialGroup()
                .addComponent(filesizeCmb, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(filesizeTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(filesizeLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(135, 135, 135))
        );
        SizePanelLayout.setVerticalGroup(
            SizePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(filesizeCmb, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGroup(SizePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(filesizeTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(filesizeLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        mainPanel.add(SizePanel, "card3");

        filecreatePanel.setLayout(new java.awt.GridLayout(1, 0));

        createdtimeCmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "before", "after", "between", " " }));
        createdtimeCmb.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                createdtimeCmbActionPerformed(evt);
            }
        });
        filecreatePanel.add(createdtimeCmb);

        createddateCmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        filecreatePanel.add(createddateCmb);

        mainPanel.add(filecreatePanel, "card4");

        filenameCmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        javax.swing.GroupLayout filenamePanelLayout = new javax.swing.GroupLayout(filenamePanel);
        filenamePanel.setLayout(filenamePanelLayout);
        filenamePanelLayout.setHorizontalGroup(
            filenamePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(filenamePanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(filenameCmb, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(fienameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 311, Short.MAX_VALUE))
        );
        filenamePanelLayout.setVerticalGroup(
            filenamePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(filenamePanelLayout.createSequentialGroup()
                .addGroup(filenamePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(filenameCmb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(fienameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        mainPanel.add(filenamePanel, "card5");

        foldertypeCmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        foldertypeCmb.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                foldertypeCmbActionPerformed(evt);
            }
        });

        foldernameTxt.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                foldernameTxtActionPerformed(evt);
            }
        });

        folderCmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        javax.swing.GroupLayout folderPanellLayout = new javax.swing.GroupLayout(folderPanell);
        folderPanell.setLayout(folderPanellLayout);
        folderPanellLayout.setHorizontalGroup(
            folderPanellLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(folderPanellLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(foldertypeCmb, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(foldernameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(folderCmb, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(75, Short.MAX_VALUE))
        );
        folderPanellLayout.setVerticalGroup(
            folderPanellLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(folderPanellLayout.createSequentialGroup()
                .addGroup(folderPanellLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(foldernameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(foldertypeCmb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(folderCmb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        mainPanel.add(folderPanell, "card6");

        lastmodifiedCmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "before", "after", "between", " " }));

        lastmodifieddateCMB.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        javax.swing.GroupLayout lastmodifiedPanelLayout = new javax.swing.GroupLayout(lastmodifiedPanel);
        lastmodifiedPanel.setLayout(lastmodifiedPanelLayout);
        lastmodifiedPanelLayout.setHorizontalGroup(
            lastmodifiedPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(lastmodifiedPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lastmodifiedCmb, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lastmodifieddateCMB, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(142, Short.MAX_VALUE))
        );
        lastmodifiedPanelLayout.setVerticalGroup(
            lastmodifiedPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(lastmodifiedPanelLayout.createSequentialGroup()
                .addGroup(lastmodifiedPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lastmodifiedCmb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lastmodifieddateCMB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        mainPanel.add(lastmodifiedPanel, "card7");

        javax.swing.GroupLayout addrulePanelLayout = new javax.swing.GroupLayout(addrulePanel);
        addrulePanel.setLayout(addrulePanelLayout);
        addrulePanelLayout.setHorizontalGroup(
            addrulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(addrulePanelLayout.createSequentialGroup()
                .addComponent(addruleButton)
                .addGap(2, 2, 2)
                .addComponent(includeexcludefileCmb, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(filetypeCmb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 402, Short.MAX_VALUE)
                .addGap(22, 22, 22)
                .addComponent(plusButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(minusButton)
                .addContainerGap())
        );
        addrulePanelLayout.setVerticalGroup(
            addrulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(addrulePanelLayout.createSequentialGroup()
                .addGroup(addrulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(addrulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(plusButton)
                        .addComponent(minusButton)
                        .addComponent(addruleButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(includeexcludefileCmb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(filetypeCmb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(mainPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        saveButton.setText("Save"); // NOI18N

        cancelButton.setText("Cancel"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(backupsetnamePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(682, Short.MAX_VALUE)
                .addComponent(saveButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cancelButton)
                .addGap(40, 40, 40))
            .addGroup(layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(addrulePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(fileviewPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(backupsetnamePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(fileviewPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(addrulePanel, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(saveButton)
                    .addComponent(cancelButton))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void backupnameTxtActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backupnameTxtActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_backupnameTxtActionPerformed

    private void addruleButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addruleButtonActionPerformed
        // TODO add your handling code here:
        includeexcludefileCmb.setVisible(true);
        filetypeCmb.setVisible(true);
        plusButton.setVisible(true);
        minusButton.setVisible(true);
        filetypeTxt.setVisible(true);
        addruleButton.setVisible(false);
    }//GEN-LAST:event_addruleButtonActionPerformed

    private void foldertypeCmbActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_foldertypeCmbActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_foldertypeCmbActionPerformed

    private void filetypeCmbActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_filetypeCmbActionPerformed
        // TODO add your handling code here:
        if (filetypeCmb.getSelectedItem().equals("File type")) {
            filetypePanel.setVisible(true);
        } else if (filetypeCmb.getSelectedItem().equals("Size")) {
            SizePanel.setVisible(true);
            filetypePanel.setVisible(false);
            filecreatePanel.setVisible(false);
            lastmodifiedPanel.setVisible(false);
            folderPanell.setVisible(false);
        } else if (filetypeCmb.getSelectedItem().equals("Created")) {
            filecreatePanel.setVisible(true);
            filetypePanel.setVisible(false);
            SizePanel.setVisible(false);
            lastmodifiedPanel.setVisible(false);
            folderPanell.setVisible(false);
        } else if (filetypeCmb.getSelectedItem().equals("Folder")) {
            lastmodifiedPanel.setVisible(true);
            filetypePanel.setVisible(false);
            SizePanel.setVisible(false);

            folderPanell.setVisible(false);
            filecreatePanel.setVisible(false);
        } else if (filetypeCmb.getSelectedItem().equals("File name")) {
            folderPanell.setVisible(true);
            filecreatePanel.setVisible(false);
            filetypePanel.setVisible(false);
            SizePanel.setVisible(false);
            lastmodifiedPanel.setVisible(false);
        }

    }//GEN-LAST:event_filetypeCmbActionPerformed

    private void foldernameTxtActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_foldernameTxtActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_foldernameTxtActionPerformed

    private void createdtimeCmbActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_createdtimeCmbActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_createdtimeCmbActionPerformed
    /**
     * @param args the command line arguments
     */
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane FiledisplayScrollPane;
    private javax.swing.JPanel SizePanel;
    private javax.swing.JButton addruleButton;
    private javax.swing.JPanel addrulePanel;
    private javax.swing.JLabel backupameLabel;
    private javax.swing.JTextField backupnameTxt;
    private javax.swing.JPanel backupsetnamePanel;
    private javax.swing.JButton cancelButton;
    private javax.swing.JComboBox createddateCmb;
    private javax.swing.JComboBox createdtimeCmb;
    private javax.swing.JTextField fienameLabel;
    private javax.swing.JList fileList;
    private javax.swing.JPanel filecreatePanel;
    private javax.swing.JTable filedisplayTable;
    private javax.swing.JScrollPane filelistScrollPane;
    private javax.swing.JSplitPane filelistSplitPane;
    private javax.swing.JComboBox filenameCmb;
    private javax.swing.JPanel filenamePanel;
    private javax.swing.JComboBox filesizeCmb;
    private javax.swing.JLabel filesizeLabel;
    private javax.swing.JTextField filesizeTxt;
    private javax.swing.JComboBox filetypeCmb;
    private javax.swing.JPanel filetypePanel;
    private javax.swing.JTextField filetypeTxt;
    private javax.swing.JPanel fileviewPanel;
    private javax.swing.JComboBox folderCmb;
    private javax.swing.JPanel folderPanell;
    private javax.swing.JTextField foldernameTxt;
    private javax.swing.JComboBox foldertypeCmb;
    private javax.swing.JComboBox includeexcludefileCmb;
    private javax.swing.JComboBox lastmodifiedCmb;
    private javax.swing.JPanel lastmodifiedPanel;
    private javax.swing.JComboBox lastmodifieddateCMB;
    private javax.swing.JPanel mainPanel;
    private javax.swing.JButton minusButton;
    private javax.swing.JButton plusButton;
    private javax.swing.JButton saveButton;
    // End of variables declaration//GEN-END:variables
}
